<% if (addOnOption.drizzle.database === 'postgresql') { %>
import { pgTable, serial, text, timestamp } from
'drizzle-orm/pg-core';

export const todos = pgTable('todos', {
  id: serial('id').primaryKey(),
  title: text('title').notNull(),
  createdAt: timestamp('created_at').defaultNow(),
});
<% } else if (addOnOption.drizzle.database === 'mysql') {
%>
import { mysqlTable, int, text, timestamp } from
'drizzle-orm/mysql-core';

export const todos = mysqlTable('todos', {
  id: int('id').primaryKey().autoincrement(),
  title: text('title').notNull(),
  createdAt: timestamp('created_at', { mode: 'date' }).defaultNow(),
});
<% } else if (addOnOption.drizzle.database === 'sqlite') {
%>
import { sqliteTable, integer, text } from
'drizzle-orm/sqlite-core';
import { sql } from 'drizzle-orm';

export const todos = sqliteTable('todos', {
  id: integer('id', { mode: 'number' }).primaryKey({
autoIncrement: true }),
  title: text('title').notNull(),
  createdAt: integer('created_at', { mode: 'timestamp' }).default(sql`(unixepoch())`),
});
<% } %>